<style type="text/css">
.plugin .bold{
    font-weight: 700;
}
.plugin .sml{
    font-size: 9px !important;
    -webkit-text-size-adjust: none;
}
.plugin p {
    margin-top: 10px;
}
.plugin div.memo {
    margin: 5px;
    padding: 5px;
    border: 1px dotted #DEEFFB;
    background: #FFF;
}
.poster{
        display: flex;
    align-items: center;
    justify-content: center;
}
.poster li{
    display: inline-block;
    width: 45%;
    margin: 1%;
}
tip{
    color: #737373;
}
</style>
<link rel="stylesheet" href="__STATIC__/lib/layer-mobile-2.0/need/layer.css?v={$version}" media="all">
<div class="layuimini-container">

<form id="app-form" class="layui-form layuimini-form">

    <div class="layuimini-main" id="app">
        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief" >
            <ul class="layui-tab-title">
                <li class="layui-this">基本信息</li>
<!--                <li class="layui-this">金额下</li>-->
                <li>快递地址</li>
                <li>时间相关</li>
                {foreach $plugin as $key=>$vo }
                <li>{$vo.name}<span class="layui-badge">插件</span></li>
                {/foreach}
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show layui-table-body layui-table-main" >
                    {include file="order/home/edit_1" /}
                </div>
                <div class="layui-tab-item layui-show layui-table-body layui-table-main" >
                    {include file="order/home/edit_2" /}
                </div>
                <div class="layui-tab-item layui-show layui-table-body layui-table-main" >
                    {include file="order/home/edit_3" /}
                </div>
                {foreach $plugin as $key=>$vo }
                <div class="layui-tab-item">
                    {plugins:include file="$vo['src']" /}
                </div>
                {/foreach}
            </div>

          
        </div>
    </div>

        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>

    </form>
</div>
<script type="text/javascript">

require(["jquery", "easy-admin", "vue"], function ($, ea, Vue) {

    var form = layui.form;

    var app = new Vue({
        el: '#app',
        data: {
        }
    });

  //loading带文字
  // layer.open({type: 2,shadeClose: false,content: '加载中'});

    ea.listen();

    $('#receive_money').click(function () {
        // alert(1)
        $.ajax({
            url: './receive_money',
            method: 'post',
            dataType: 'json',
            data: {'order_id': {$row.id}},
            success: function(res) {
                // 假如返回的 res.data 是需要导出的列表数据
                console.log(res.data);// [{name: 'wang', age: 18}, {name: 'layui', age: 3}]
                if (res.code == 1){
                    // $('#status').html(res.data.status)
                    window.location.reload()
                }
            }
        });
    })
    $('#receive_money1').click(function () {
        // alert(1)
        $.ajax({
            url: './receive_money',
            method: 'post',
            dataType: 'json',
            data: {'order_id': {$row.id}},
            success: function(res) {
                // 假如返回的 res.data 是需要导出的列表数据
                console.log(res.data);// [{name: 'wang', age: 18}, {name: 'layui', age: 3}]
                if (res.code == 1){
                    // $('#status').html(res.data.status)
                    window.location.reload()
                }
            }
        });
    })
    $('#send_goods').click(function () {
        // alert(1)
        $.ajax({
            url: './send_goods',
            method: 'post',
            dataType: 'json',
            data: {'order_id': {$row.id}},
            success: function(res) {
                // 假如返回的 res.data 是需要导出的列表数据
                console.log(res.data);// [{name: 'wang', age: 18}, {name: 'layui', age: 3}]
                if (res.code == 1){
                    // $('#status').html(res.data.status)
                    window.location.reload()
                }
            }
        });
    })
    $('#receive_goods').click(function () {
        // alert(1)
        $.ajax({
            url: './receive_goods',
            method: 'post',
            dataType: 'json',
            data: {'order_id': {$row.id}},
            success: function(res) {
                // 假如返回的 res.data 是需要导出的列表数据
                console.log(res.data);// [{name: 'wang', age: 18}, {name: 'layui', age: 3}]
                if (res.code == 1){
                    // $('#status').html(res.data.status)
                    window.location.reload()
                }
            }
        });
    })
    $('#apply_cancel').click(function () {
        // alert(1)
        $.ajax({
            url: './apply_cancel',
            method: 'post',
            dataType: 'json',
            data: {'order_id': {$row.id}},
            success: function(res) {
                // 假如返回的 res.data 是需要导出的列表数据
                console.log(res.data);// [{name: 'wang', age: 18}, {name: 'layui', age: 3}]
                if (res.code == 1){
                    // $('#status').html(res.data.status)
                    window.location.reload()
                }
            }
        });
    })
    $('#cancel_order').click(function () {
        // alert(1)
        $.ajax({
            url: './cancel_order',
            method: 'post',
            dataType: 'json',
            data: {'order_id': {$row.id}},
            success: function(res) {
                // 假如返回的 res.data 是需要导出的列表数据
                console.log(res.data);// [{name: 'wang', age: 18}, {name: 'layui', age: 3}]
                if (res.code == 1){
                    // $('#status').html(res.data.status)
                    window.location.reload()
                }
            }
        });
    })
    $('#add-express').click(function () {
        $('#add-express-div').append('        <div>\n' +
            '            <input style="min-width: 300px;width: 80%; float: left" type="text" name="express_sn[]" class="layui-input" value="">\n' +
            '            <button onclick="delete_express(this)" style="display:inline-block;float: left; margin-left: 30px;" class="delete-express layui-btn layui-btn-sm layui-btn-danger" type="button">删除</button>\n' +
            '        </div>')
    })

    $('.delete-express').click(function () {
        parent_ele = $(this).parent()
        parent_ele.remove()
    })
});
</script>
<script>
    function delete_express(e){
        e.parentNode.parentNode.removeChild(e.parentNode)
    }
</script>